//
//  VideoObj.h
//  Brand
//
//  Created by Faker on 5/6/14.
//  Copyright (c) 2014 Faker. All rights reserved.
//

#import <Foundation/Foundation.h>
@class M3U8Handle;
@class M3U8DownloadManage;
@class AFDownloadRequestOperation;

@interface VideoObj : NSObject

#pragma mark - 剧
@property (strong, nonatomic) NSString *contentId;
@property (strong, nonatomic) NSString *contentName;
@property (strong, nonatomic) NSString *imageSrc;
@property (strong, nonatomic) NSString* type;  //电影和周播剧
@property (strong, nonatomic) NSString* length;

@property (strong, nonatomic) NSString* sourceType; //来源类型   m3u8  mp4

#pragma mark - 播放
@property (strong, nonatomic) NSString* playURL;
@property (assign, nonatomic) int currentPlayIndex;  //当前播放的集的index.
@property (assign, nonatomic) float hasPlayDur;

#pragma  mark - 集
@property (strong, nonatomic) NSString *episodeName;
@property (strong, nonatomic) NSString *episodeId;

#pragma mark - 下载需要

@property (assign, nonatomic) BOOL isInDownload;  //是否是在下载队列中，不管成功与否，用在下载剧中。
@property (assign, nonatomic) BOOL allowResume;  //是否支持断点续传。  //默认为YES
@property (assign, nonatomic) BOOL isLoading;
@property (assign, nonatomic) BOOL isComplete;
@property (assign, nonatomic) float percent;
@property (assign, nonatomic) float percentLast;  //上一次更新UI时的百分比，防止过分频繁的刷UI，只有两者差距大于大于1%才刷
@property (assign, nonatomic) long long contentLength;
@property (strong, nonatomic) id downloadRequestURL;  //有可能是字符串，有可能是数组 m3u8地址，或者mp4地址，或者图片地址数组
@property (assign, nonatomic) BOOL isReadyShow; //是否上映
@property (assign, nonatomic) BOOL isNeedVIP;  //是否需要VIP才能播放

//有可能是M3U8
@property (strong, nonatomic) M3U8Handle *m3u8Handle;
@property (strong, nonatomic) M3U8DownloadManage *m3u8DownloadManage;

//6
@property (strong, nonatomic) AFDownloadRequestOperation *requestOperaiton;
@property (strong, nonatomic) NSString *requestTempFilePath;

//7
@property (strong, nonatomic) NSURLSessionDownloadTask *downTask;
@property (strong, nonatomic) NSData *downTaskResumeData;



#pragma mark - 影片介绍
@property (strong, nonatomic) NSString* director;
@property (strong, nonatomic) NSString* role;
@property (strong, nonatomic) NSString* area;
@property (strong, nonatomic) NSString* category;
@property (strong, nonatomic) NSString* releaseDate;
@property (strong, nonatomic) NSString* producer;
@property (strong, nonatomic) NSString* publisher;
@property (strong, nonatomic) NSString* intro;
@property (strong, nonatomic) NSArray* picArray;
@property (strong, nonatomic) NSString* praiseNums;


@end
